#ifndef __SERVER_H__
#define __SERVER_H__

#include <stdio.h>
#include <unistd.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
#include<termios.h>  
#include<string.h>
#include <pthread.h>
#include <sys/socket.h>
#include <arpa/inet.h>
typedef unsigned char uint8_t;
typedef unsigned int uint32_t;
typedef struct env_info{
    uint8_t head[3];
    uint8_t type;
    uint8_t snum;
    uint8_t temp[2];
    uint8_t hum[2];
    uint8_t x;
    uint8_t y;
    uint8_t z;
     uint32_t ill;
     uint32_t bet;
    uint32_t adc;
}info;
typedef struct conver_env_info{
    int snum;
    float temp;
    float hum;
    signed char x;
    signed char y;
    signed char z;
     float ill;
     float bet;
    float adc;
}con_info;

void serial_init(int fd);
void *p_thread_zig(void * arg);
void *p_thread_qt(void *arg);
#endif
